import { VxeGridProps } from 'vxe-table';
import { BizStationMaintenanceVo } from '@/api/station/maintenance/types';

export function getTableConfig(): VxeGridProps<BizStationMaintenanceVo> {
  return {
    id: 'tenant',
    loading: false,
    minHeight: '200px',
    autoResize: true,
    border: 'inner',
    resizable: true,
    showOverflow: 'tooltip',
    stripe: true,
    rowConfig: {
      isHover: true,
      keyField: 'id'
      // height: 56
    },
    customConfig: {
      storage: true
    },
    columns: [
      { title: '序号', type: 'seq', width: 50 },
      { sortable: true, field: 'billNo', title: '工单号' },
      { sortable: true, field: 'regionName', title: '区域' },
      { sortable: true, field: 'status', title: '处理状态', slots: { default: 'status' } },
      { sortable: true, field: 'startTime', title: '处理时间' },
      { sortable: true, field: 'processUser', title: '处理人(用户组)' },
      { sortable: true, field: 'processDuration', title: '处理时长' },
      { sortable: true, field: 'handle', title: '操作', slots: { default: 'handle' } }
    ],
    data: [] as BizStationMaintenanceVo[]
  };
}
